-
Notifications
You must be signed in to change notification settings - Fork 32
add testing #26
add testing #26
Conversation
motivation: make sure library works as expected changes: * add a Sample target we can use for testing * add a test to make sure backtraces are printed as expected * make docker tests use a release version for a more realistic tests * update linux test generation script to work with release builds
| let expectedError = UUID().uuidString | ||
| let pipe = Pipe() | ||
| let process = Process() | ||
| process.executableURL = URL(fileURLWithPath: ".build/release/Sample") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an SPM implementation detail and not guaranteed to be stable, but it's the best we can do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh actually, could we swift run Sample?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we need the path for something (ie. if we can't use swift run for some reason), this might work:
$ swift build --show-bin-path
/Users/johannes/devel/swift-nio/.build/x86_64-apple-macosx/debug
$ swift build --show-bin-path -c release
/Users/johannes/devel/swift-nio/.build/x86_64-apple-macosx/release
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using swift run sounds like a great idea, I will try it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
motivation: make sure library works as expected
changes: